package net.maku.events.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.maku.framework.common.utils.DateUtils;
import net.maku.member.entity.MemberUserEntity;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: qr
 * @Date: 2025/3/27 22:46
 * @Version 1.0
 */
@Data
public class UserCommentVO implements Serializable, TransPojo {

    @Schema(description = "id")
    private Long id;

    @Schema(description = "用户id")
    @Trans(type = TransType.SIMPLE, target = MemberUserEntity.class, fields = "realName", ref = "realName")
    private Long userId;

    @Schema(description = "发布人姓名")
    private String realName;

    @Schema(description = "点赞量")
    private Integer likes;

    @Schema(description = "评论内容")
    private String commentContents;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createTime;

    @Schema(description = "是否点赞")
    private Boolean selfLike;

}
